package com.itheima.d2_byte_stream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/*
     目标：掌握文件字节输出流FileOutputStream的使用。
 */
public class FileOutputStreamTest4 {
    public static void main(String[] args) throws Exception {
        /*FileOutputStream fos = new FileOutputStream("bbb.txt");
        fos.write(97);
        byte[] bytes = new byte[]{97, 98, 99};
        fos.write(bytes);

        fos.write(bytes, 1, 2);

        fos.close();*/

        FileOutputStream fos = new FileOutputStream("bbb.txt", true);
//        fos.write(96);
        for (int i = 0; i < 10; i++) {
            fos.write("再装逼 让你 飞起来".getBytes());
            fos.write(System.lineSeparator().getBytes());
        }


        fos.close();
    }
}
